/***********************************************************************
 * Module:  CostType.java
 * Author:  penwei
 * Purpose: 学校的收费项目
 ***********************************************************************/

package cn.hdmis.entity;

import java.util.*;

/**
 * 
 * 项目名称：hdmis1.1
 * 类名称：CostType
 * 类描述：收费
 * 创建人：Administrator
 * 创建时间：2013-2-13 下午02:49:23
 * 修改人：Administrator
 * 修改时间：2013-2-13 下午02:49:23
 * 修改备注：
 * @version 
 * 
 */
public class CostType implements java.io.Serializable {
	private static final long serialVersionUID = 8852626001367029217L;
	/**	编号 */
	private Integer id;
	/**	收费项名称 */
	private String name;
	/**	默认金额 */
	private Double defaultValue;
	/**	收费项是否可用 */
	private Boolean disabled;
	/**	收费项启用时间 */
	private Date enableDate;
	/**	收费项停用时间 */
	private Date disableDate;

	public CostType() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * Get value of id
	 * 
	 * @return id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Set value of id
	 * 
	 * @param newId
	 */
	public void setId(Integer newId) {
		this.id = newId;
	}

	/**
	 * Get value of name
	 * 
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Set value of name
	 * 
	 * @param newName
	 */
	public void setName(String newName) {
		this.name = newName;
	}

	/**
	 * Get value of defaultValue
	 * 
	 * @return defaultValue
	 */
	public Double getDefaultValue() {
		return defaultValue;
	}

	/**
	 * Set value of defaultValue
	 * 
	 * @param newDefaultValue
	 */
	public void setDefaultValue(Double newDefaultValue) {
		this.defaultValue = newDefaultValue;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	/**
	 * Get value of enableDate
	 * 
	 * @return enableDate
	 */
	public Date getEnableDate() {
		return enableDate;
	}

	/**
	 * Set value of enableDate
	 * 
	 * @param newEnableDate
	 */
	public void setEnableDate(Date newEnableDate) {
		this.enableDate = newEnableDate;
	}

	/**
	 * Get value of disableDate
	 * 
	 * @return disableDate
	 */
	public Date getDisableDate() {
		return disableDate;
	}

	/**
	 * Set value of disableDate
	 * 
	 * @param newDisableDate
	 */
	public void setDisableDate(Date newDisableDate) {
		this.disableDate = newDisableDate;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {

		if (obj == null)
			return false;

		if (obj == this)
			return true;

		if (!(obj instanceof CostType))
			return false;
		else{
			CostType ct = (CostType)obj;
			return this.getId()==ct.getId();
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hashCode = 0;
		if (this.id != null)
			hashCode = 29 * hashCode + id.hashCode();
		if (this.name != null)
			hashCode = 29 * hashCode + name.hashCode();
		if (this.defaultValue != null)
			hashCode = 29 * hashCode + defaultValue.hashCode();
		if (this.enableDate != null)
			hashCode = 29 * hashCode + enableDate.hashCode();
		if (this.disableDate != null)
			hashCode = 29 * hashCode + disableDate.hashCode();
		return hashCode;
	}


}